Field of the Invention
The present invention relates to an image processing apparatus, an image capturing apparatus, an image processing method, an image capturing method, and a storage medium.
Description of the Related Art
When a subject image having a spatial frequency that is higher than one half of a sampling frequency N is captured by an image capturing apparatus, folding distortion (moire) will generally occur in the captured image as per the Nyquist theorem. As a measure taken to prevent moire, an optical low-pass filter for cutting off frequencies higher than N/2 is arranged on an image capturing surface of an image sensor.
However, there is a limit to steepening the cut-off characteristics of the optical low-pass filter, and thus frequencies lower than N/2 are also attenuated. Accordingly, usage of the optical low-pass filter involves the disadvantage of the resolution of the entire screen being reduced, and it is not possible to obtain an image with high image quality that corresponds to the original number of pixels of the image sensor. For example, in a scene like a natural landscape in which there is no regular artificial objects, large moire is not likely to occur, and thus the disadvantage of the reduction in resolution may outweigh the advantage of moire prevention (reduction). In recent years, therefore, a large number of cameras that are not provided with an optical low-pass filter have appeared on the market. In such a case, there is a possibility of large moire occurring depending on the scene, and thus a technique for reducing moire as needed at image capture is proposed.
For example, a technique in which an aperture value for shooting is increased to cause a diffraction phenomenon, and frequencies higher than N/2 are attenuated before reaching an image sensor is known as an ordinary shooting technique of a camera. FIG. 4 is a diagram illustrating diffraction limit curves, and its horizontal axis represents the spatial frequency and its vertical axis represents the modulation transfer function (MTF). As shown in FIG. 4, the cutoff frequency shifts to the lower frequency side the more the F number increases, and it is thus possible to reduce moire by increasing the aperture value. However, increasing the aperture value will reduce the resolution of the entire screen to the same extent or more as in the case where an optical low-pass filter is used.
In order to prevent such a situation, Japanese Patent Laid-Open No. 10-248068 proposes a technique in which luminance signals are generated based on an image captured in an in-focus state, and color signals are generated based on an image that was captured in a state of being defocused by a predetermined amount from the in-focus state. According to this technique, it is possible to obtain a high-definition image in which color moire is suppressed. However, the color resolution of the entire screen is likely to be reduced. Furthermore, another subject may be in focus in the defocused state, and color moire may occur in another region different from the originally focused region.
Ordinarily, moire occurs in a region in which there is a subject with a high spatial frequency, and thus it is not necessarily the case that large moire occurs in the entire screen. However, the conventional techniques for reducing moire may also reduce the resolution of the entire screen including a region with small moire.